class MyFolderFileModel {
  int? errcode;
  String? errmsg;
  List<MyFolderFileItemModel>? data;
  String? message;

  MyFolderFileModel({this.errcode, this.errmsg, this.data, this.message});

  MyFolderFileModel.fromJson(Map<String, dynamic> json) {
    errcode = json['errcode'];
    errmsg = json['errmsg'];
    if (json['data'] != null) {
      data = <MyFolderFileItemModel>[];
      json['data'].forEach((v) {
        data!.add(new MyFolderFileItemModel.fromJson(v));
      });
    }
    message = json['message'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['errcode'] = this.errcode;
    data['errmsg'] = this.errmsg;
    if (this.data != null) {
      data['data'] = this.data!.map((v) => v.toJson()).toList();
    }
    data['message'] = this.message;
    return data;
  }
}

class MyFolderFileItemModel {
  int? id;
  int? attachmentId;
  String? icon;
  String? createDate;
  String? dateBeauty;
  String? name;
  String? url;
  String? mimetype;
  int? folderId;
  String? folderIdName;
  var preview_url;

  MyFolderFileItemModel(
      {this.id,
        this.attachmentId,
        this.icon,
        this.createDate,
        this.dateBeauty,
        this.name,
        this.url,
        this.mimetype,
        this.folderId,
        this.preview_url,
        this.folderIdName});

  MyFolderFileItemModel.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    attachmentId = json['attachment_id'];
    icon = json['icon'];
    createDate = json['create_date'];
    dateBeauty = json['date_beauty'];
    name = json['name'];
    url = json['url'];
    mimetype = json['mimetype'];
    folderId = json['folder_id'];
    folderIdName = json['folder_id_name'];
    preview_url = json['preview_url'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['id'] = this.id;
    data['attachment_id'] = this.attachmentId;
    data['icon'] = this.icon;
    data['create_date'] = this.createDate;
    data['date_beauty'] = this.dateBeauty;
    data['name'] = this.name;
    data['url'] = this.url;
    data['mimetype'] = this.mimetype;
    data['folder_id'] = this.folderId;
    data['folder_id_name'] = this.folderIdName;
    return data;
  }
}
